package client;

import shared.BalanceData;

/**
 * class Balance handles the view balance in the CCCS-system
 * 
 * @author Rasmus Stjerne, Joachim Lindholm, Daniel Gramstrup, Pamela Pedersen
 */
public class Balance extends Transaction {
	public Balance(Display display, Connection connection) {
		super(display, connection);
	}

	/**
	 * executes the function of this class - view balance
	 */
	@Override
	public void execute() {
		Display display = getDisplay();
		// get balance from server
		BalanceData bd = getConnection().viewBalance();
		// display the balance information on the screen
		display.displayBalance(bd);
	}
}